package dao;

import com.fasterxml.jackson.databind.JsonNode;
import com.google.inject.ImplementedBy;
import models.GeometryDesc_T_Entity;
import models.TruckInfo_C_Entity;
import models.TruckInfo_NT_Entity;
import services.TruckInfo_Repository_JPA;

import java.util.List;
import java.util.concurrent.CompletionStage;

/**
 * This interface provides a non-blocking API for possibly blocking operations.
 */
@ImplementedBy(TruckInfo_Repository_JPA.class)
public interface TruckInfo_Repository {

    CompletionStage<String> addTruckNo(JsonNode DeptIds, JsonNode LoadCapacitys, JsonNode PlateNos, JsonNode TruckTypes);
    CompletionStage<List<TruckInfo_C_Entity>> getTruckList(String fdTruckNumber);
    CompletionStage<List<GeometryDesc_T_Entity>> areaList();
    CompletionStage<List<TruckInfo_NT_Entity>> truckById(Integer TruckId);
    CompletionStage<List<TruckInfo_NT_Entity>> truckByDeptIds(String DeptIds);
    CompletionStage<List<TruckInfo_NT_Entity>> truckByAreaNames(String AreaNames);
    CompletionStage<List<TruckInfo_NT_Entity>> truckByAreaIds(String AreaIds, String PhoneNumber);
    CompletionStage<String> ModifyTruckType(String PlateNo,String type);
    CompletionStage<String> DeleteTruck(String PlateNo);
}
